package com.snopy.io.scanner;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

/**
 * @author snopy
 * @version 1.0.0
 * @classname DemoScanner
 * @description
 * @email 77912204@qq.com
 * @date 2022/11/15 20:17
 */
public class DemoScanner {

    public static void main(String[] args) {
        Scanner in = null;
        try {
            in = new Scanner(new BufferedReader(new FileReader("F:\\workspaceA\\Sonata\\Sonata_test\\src\\main\\resources\\abc.txt")));
            while (in.hasNext()){
                System.out.println(in.next());
            }
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        }finally {
            if (in != null){
                in.close();
            }
        }
    }
}
